home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
- <head>
- <title>MyServer Documentation - Controling Access - www.myserverproject.net</title>
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
- <meta http-equiv="Content-Style-Type" content="text/css" />
- <link rel="stylesheet" type="text/css" href="../style/myserver.css" />
- </head>
- <body>
- <table class="center" width="95%">
- <tr>
- <td class="center">
- <h1 class="title">CONTROLLING ACCESSES</h1>
- <br />
- In order to control the access to a file, you must add the security in
- the directory you would like to protect.<br />
- <br />
- The syntax of the file is:<br />
- <br />
- <span class="code"> <?xml version="1.0"?><br />
- <SECURITY><br />
- <HTTP TRACE="ON" /><br />
- <AUTH TYPE="Basic" /></span><span class="code"><br />
- <ACTION name="Host" value="localhost">ALLOW</ACTION><br />
- <USER NAME="God" PASS="godpassword" READ="TRUE" WRITE="TRUE" BROWSE="TRUE"
- EXECUTE="TRUE" /><br />
- <!--This is the setting for the user--><br />
- <USER NAME="Guest" PASS="" READ="TRUE" BROWSE="TRUE"/><br />
- <!--The guest user--><br />
- <USER NAME="Tim" PASS="Tom" READ="TRUE" EXECUTE="TRUE" BROWSE="TRUE"/><br />
- <!--Another user--><br />
- <ITEM FILE="file1" READ="TRUE" WRITE="FALSE" EXECUTE="FALSE"><br />
- <ACTION name="Host" value="remote">DENY</ACTION><br />
- <!--Define a file and its permissions--><br />
- <USER NAME="Jim" PASS="Morrison" READ="TRUE" WRITE="FALSE" EXECUTE="FALSE"
- /><br />
- <!--Define the user permissions for the file--><br />
- <USER NAME="Bob" PASS="Marley" READ="TRUE" WRITE="FALSE" EXECUTE="TRUE"
- /><br />
- <ACTION name="Host" value="localhost">DENY</ACTION>
- <br />
- <!--Another user permissions for the file--><br />
- </ITEM><br />
- <--End of the file block--><br />
- </SECURITY><br />
- </span> <br />
- <br />
- The line <span class="code"><HTTP TRACE="ON" /></span> is optional,
- and is described in the <a href="virtualhosts.htm">Virtual Hosts</a> section
- of this guide. Please, go to that link if you want to understand about
- that line.<br />
- <br />
- The line <span class="code"><AUTH TYPE="Basic" /></span>, optional,
- selects the authentication scheme to be used for your site. Its default
- value is "Basic", but you can also use "Digest", so it will look like
- this:<br />
- <br />
- <span class="code"><AUTH TYPE="Digest" /></span><br />
- if the line isn't in the file, the default "Basic" will be used.<br />
- The "Digest" schema is safer, as the passwords aren't transferred open
- through the net.<br />
- <br />
- The engine first checks to see if the user has permissions in the file
- block:<br />
- <span class="code"><USER NAME="Bob" PASS="Marley" READ="TRUE" WRITE="FALSE"
- EXECUTE="TRUE" /></span><br />
- <br />
- If there are no permissions defined, the engine tries to use the permissions
- that are defined for the file:<br />
- <span class="code"><ITEM FILE="file1" READ="TRUE" WRITE="FALSE" EXECUTE="FALSE"></span><br />
- <br />
- If the engine cannot find any file permissions, it then uses the general
- settings for the user: <br />
- <br />
- <span class="code"><USER NAME="Guest" PASS="" READ="TRUE" BROWSE="TRUE"/></span><br />
- <br />
- If the user is not defined, the engine will send an error to the user.<br />
- <br />
- <br />
- <br />
- <span class="code">The <ACTION></span> lines above define if a resource
- will be allowed to be accessed or not, depending on the conditions. For
- example, the line <br />
- <br /><br /><span class="code"><ACTION name="Host" value="remote">DENY</ACTION></span>
- <br /><br />means the file "file1" will be denied if the Host used to access
- the file is "remote" as hostname. But if there were others maps
- to the file in other hostnames, for example "localhost", it
- can be accessed, execpt by user Bob, as specified by the line below:<br />
- <br />
- <span class="code"><ACTION name="Host" value="localhost">DENY</ACTION>
- </span> <br />
- <br /><br />
-
- If the security file is not present, a default security file will be used
- by the engine. The default security file is found in the system directory.<br />
-
- </td>
- </tr>
- </table>
- </body>
- </html>